#include<stdio.h>

int main()
{	  	 	  	    
    int a, b, c, d;
    scanf("%d", &a);

    b = a % 10;
    c = a / 100;
    d = a / 10 % 10;

    if (a < 0) printf("Input error");
    else if (b * b * b + c * c * c + d * d * d == a) printf("Yes");
    else printf("No");
    return 0;

}	  	 	  	    
